package com.bodystm.temperature.web;

import java.net.Socket;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

public  class UrineBagDevice {
	/**
	 * 设备的mac地址
	 */
	private String strMac;
	/**
	 * 该设备最后一次保存数据的时间
	 */
	private Date lastSavTime;
	/**
	 * 设备当前温度，即最后一次上传的温度
	 */
	private int currentNY;
	private int currentNL;
	private Date samplingTime;
	private boolean ifgetSamplingTime;
	/**
	 * 是否已经发送过采样命令
	 */
	private boolean ifsentCMD=false;
	/**
	 * 在向设备发送采样命令后第几条数据，如果超过三包还没有回应则重发采样命令
	 */
	private int indexOfMsgs4Sampling=0;
	/**
	 * 上一次发送采样命令的时间
	 */
	private Date lastSamplingTime;
	/**
	 * 该设备最后一次数据（用于连续两个33显示问题相关）
	 */
	//private float lastDegree=0;
	/**
	 * 该设备第一次保存数据的时间，用于判断是否超过50小时，超过50小时的数据则不再存储和显示，直接忽略
	 */
	private Date firstSavTime;
	//下边两个为偶然异常数据的处理相关
	/**
	 * 异常温度或者正常温度
	 */
	//private float unusualDegree=0;
	/**
	 * 上次的异常时间
	 */
	private Date unusualTime;
	//用于做20分钟内的体温数据的平均数（去掉一个最高值和最低值）
	List<Float> dataIn20Min=new ArrayList<Float>();
	List<Date> date4DataIn20Min=new ArrayList<Date>();
	//报警相关
	/**
	 * 警报类型（0代表正常不报警，1代表低温报警，2代表高温报警，3代表超高温报警）
	 */
	int warningType=0;
	/**
	 * 是否报警，当温度恢复正常时或者用户点击停止后将其设置回true的状态
	 */
	boolean warningOrNot=true;
	/**
	 * 当失去连接，持续一段时间不上数时是否报警，当温度恢复正常时或者用户点击停止后将其设置回true的状态
	 */
	boolean warningOrNot4NoSign=true;
	/**
	 * 没电时是否提醒用户
	 */
	Boolean warningOrNot4NoPower;
	private int rssi;
	/**
	 * 尿袋快满时是否提醒
	 */
	boolean warningOrNot4Full=true;
	/**
	 * Socket连接对象
	 */
	private Socket socket;
	public String getStrMac() {
		return strMac;
	}
	public void setStrMac(String strMac) {
		this.strMac = strMac;
	}
	public Date getLastSavTime() {
		return lastSavTime;
	}
	public void setLastSavTime(Date lastSavTime) {
		this.lastSavTime = lastSavTime;
	}
	public Date getFirstSavTime() {
		return firstSavTime;
	}
	public void setFirstSavTime(Date firstSavTime) {
		this.firstSavTime = firstSavTime;
	}
	public Date getUnusualTime() {
		return unusualTime;
	}
	public void setUnusualTime(Date unusualTime) {
		this.unusualTime = unusualTime;
	}
	public List<Float> getDataIn20Min() {
		return dataIn20Min;
	}
	public void setDataIn20Min(List<Float> dataIn20Min) {
		this.dataIn20Min = dataIn20Min;
	}
	public List<Date> getDate4DataIn20Min() {
		return date4DataIn20Min;
	}
	public void setDate4DataIn20Min(List<Date> date4DataIn20Min) {
		this.date4DataIn20Min = date4DataIn20Min;
	}
	public int getWarningType() {
		return warningType;
	}
	public void setWarningType(int warningType) {
		this.warningType = warningType;
	}
	public boolean isWarningOrNot() {
		return warningOrNot;
	}
	public void setWarningOrNot(boolean warningOrNot) {
		this.warningOrNot = warningOrNot;
	}
	public boolean isWarningOrNot4NoSign() {
		return warningOrNot4NoSign;
	}
	public void setWarningOrNot4NoSign(boolean warningOrNot4NoSign) {
		this.warningOrNot4NoSign = warningOrNot4NoSign;
	}
	public Boolean getWarningOrNot4NoPower() {
		return warningOrNot4NoPower;
	}
	public void setWarningOrNot4NoPower(Boolean warningOrNot4NoPower) {
		this.warningOrNot4NoPower = warningOrNot4NoPower;
	}
	public int getCurrentNY() {
		return currentNY;
	}
	public void setCurrentNY(int currentNY) {
		this.currentNY = currentNY;
	}
	public int getCurrentNL() {
		return currentNL;
	}
	public void setCurrentNL(int currentNL) {
		this.currentNL = currentNL;
	}
	public Date getSamplingTime() {
		return samplingTime;
	}
	public void setSamplingTime(Date samplingTime) {
		this.samplingTime = samplingTime;
	}
	public boolean isIfsentCMD() {
		return ifsentCMD;
	}
	public void setIfsentCMD(boolean ifsentCMD) {
		this.ifsentCMD = ifsentCMD;
	}
	public boolean isIfgetSamplingTime() {
		return ifgetSamplingTime;
	}
	public void setIfgetSamplingTime(boolean ifgetSamplingTime) {
		this.ifgetSamplingTime = ifgetSamplingTime;
	}
	public int getIndexOfMsgs4Sampling() {
		return indexOfMsgs4Sampling;
	}
	public void setIndexOfMsgs4Sampling(int indexOfMsgs4Sampling) {
		this.indexOfMsgs4Sampling = indexOfMsgs4Sampling;
	}
	public Date getLastSamplingTime() {
		return lastSamplingTime;
	}
	public void setLastSamplingTime(Date lastSamplingTime) {
		this.lastSamplingTime = lastSamplingTime;
	}
	public int getRssi() {
		return rssi;
	}
	public void setRssi(int rssi) {
		this.rssi = rssi;
	}
	public boolean isWarningOrNot4Full() {
		return warningOrNot4Full;
	}
	public void setWarningOrNot4Full(boolean warningOrNot4Full) {
		this.warningOrNot4Full = warningOrNot4Full;
	}
	public Socket getSocket() {
		return socket;
	}
	public void setSocket(Socket socket) {
		this.socket = socket;
	}

}
